<?php

namespace maotool\src\test;

use maotool\core\validate\FormValidateRuleData;
use maotool\core\validate\validator\DefaultValidator;
use maotool\util\FormValidateUtil;
use PHPUnit\Framework\TestCase;

class FormValidateUtilTest extends TestCase
{

    public function testIndex()
    {
        $data = [
            "name" => "wangliang",
            "age" => 18
        ];
        $ret1 = FormValidateUtil::check($data, [
            new FormValidateRuleData(false, "请输入姓名"),
        ]);
        $user = new Users();
        $ret2 = FormValidateUtil::check($user, Users::class);
        $this->assertTrue(true);
    }

}